<template>
  <div class="breadcumb" style="line-height: 50px;margin-left:10px" >
        <el-breadcrumb separator="/">
            <el-breadcrumb-item v-for="(list,i) in lists" :key="i">
                <router-link :to="list.path">{{list.meta.title}}</router-link>
            </el-breadcrumb-item>
        </el-breadcrumb>
    </div>
</template>

<script>
export default {
  name:'breadcumb',
  data(){
    return {
      lists:[]
    }
  },
  created(){
      this.lists = this.$route.matched;
  },
  watch:{
      $route(to,from){
          //console.log(to);
          this.lists = to.matched;
      }
  }
}
</script>
